#-coding=utf8

import string

auth_chars = string.ascii_letters + string.digits + '_.'
def filter_auth(s):
    new = [c for c in s if c in auth_chars]
    new = string.join(new, '')
    return new

hex_chars = '0123456789abcdefABCDEF'

def filter_hex(s):
    new = [c for c in s if c in hex_chars]
    new = string.join(new, '')
    new = new.lower()
    return new

def filter_file(s):
    new = s.replace('/', '')
    return new
